﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="membership_login_dialog.aspx.cs"
    Inherits="membership_login_dialog" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="ctl00_Head1">
    <title>曼福旅游保险</title> 
    <script src="_common/scripts/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="_common/scripts/jquery_regform_validator.js"></script> 
    <script src="_common/scripts/util.js" type="text/javascript"></script> 
    <!-- ANALYTICS END -->
    <script type="text/javascript">
        $(document).ready(function () {
            validator.setup("#form3"); 
        })
        function ValidateSignin() {
            var _val = validator.validatorAll(); 
            var _msg = "";
            if ($("#txtUsername").val() == "") {
                _val = false;
                _msg += "用户名不能为空!\r\n\n";
                document.getElementById("txtUsername").focus();
            }
            if ($("#txtPassword").val() == "") {
                _val = false;
                _msg += "密码不能为空!\r\n\n";
                document.getElementById("txtPassword").focus();
            }

            if (!_val) {
                alert(_msg);
                $("#btnSignin").attr("disabled", false);
                return false;
            }
            else {
                $.ajax({
                    type: "POST",
                    url: prependOrgName("/membership_login_dialog.aspx"),
                    data: {
                        otype: "membership_login",
                        txtUsername: $("#txtUsername").val(),
                        txtPassword: $("#txtPassword").val()
                    },
                    async: false,
                    success: function (data, textStatus) {
                        if (data == "succeeded") {
                            alert("登录成功！"); 
                        }
                        else {
                            alert(data);
                        }
                    }
                });
            }
        }
    </script>
</head>
<body>
    <form id="form3"> 
    <div class="clear">
    </div>
    <div id="borderedContainer" style="width: 520px;">
        <div class="leftCol" style="width: 500px;">
            <div class="form_width" style="width: 500px;">
                <!-- End of DoubleClick Floodlight Tag: Please do not remove -->
                <div class="fieldsetTop">
                </div>
                <div class="fieldsetMidd" style="width: 480px;">
                    <div class="form_content">
                        <div class="formcontent">
                            <p class="form_titles">
                                会员登录</p> 
                            <div class="fieldsetBtm" style="width: 480px;">
                            </div>
                            <div>
                                <table border="0" class="quoteForm" style="padding-left: 5px;">
                                    <tbody>
                                        <tr>
                                            <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                <label for="txtUsername">
                                                    用户名：</label>
                                            </td>
                                            <td>
                                                <input type="text" class="textbox" id="txtUsername" name="txtUsername" style="width: 150px;"
                                                    onblur="this.className='colorblur';" onfocus="this.className='colorfocus';" />
                                            </td>
                                        </tr>
                                        <tr style="line-height: 8px;">
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                <label for="txtPassword">
                                                    密码：</label>
                                            </td>
                                            <td>
                                                <input type="password" class="textbox" id="txtPassword" name="txtPassword" style="width: 150px;"
                                                    onblur="this.className='colorblur';" onfocus="this.className='colorfocus';" />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="fieldsetBtm" style="width: 480px;">
                        </div>
                        <div class="buttons">
                            <span><a id="btn_login" href="###" onclick="ValidateSignin();">
                                登录</a> </span>
                        </div>
                    </div>
                    <div class="clearBoth">
                    </div>
                </div>
            </div>
        </div>
        <div class="clearBoth">
        </div>
    </div>
    </form>
</body>
</html>
